package xh.lumt.server.commands.impl;


import xh.lumt.server.PlayingUpdateInfo;
import xh.lumt.server.ServerController;
import xh.lumt.server.commands.PlayerCommand;
import xh.lumt.server.commands.PlayerOperation;

/**
 * Created by Administrator on 2016/6/26.
 */
public class Volume implements PlayerCommand {

    private float volume;

    public PlayerOperation getPlayerOperation() {
        return PlayerOperation.Volume;
    }

    public Object doCommand() {
        PlayingUpdateInfo p = new PlayingUpdateInfo();
        p.setVolume(volume);

        ServerController.getPlayStatusCenter().update(p);
        return null;
    }

    public void initFromParams(String[] params) {
        volume = Float.valueOf(params[0]);
    }

}
